#include<iostream>
using namespace std;
#include<vector>

int findSubstringInWraproundString(string s) {
	int length1 = s.size();
	vector<int>dp(length1, 1);

	for (int i = 1; i < length1; i++)
	{
		if (s[i]==s[i - 1] + 1)
		{
			dp[i] = dp[i - 1] + 1;
		}
		if (s[i - 1] == 'z' && s[i] == 'a')
		{
			dp[i] = dp[i - 1] + 1;
		}
	}
	int arr[30] = { 0 };
	for (int i = 0; i < length1; i++)
	{
		if (arr[s[i]-'a'] < dp[i])
		{
			arr[s[i] - 'a'] = dp[i];
		}
	}
	int number = 0;
	for (auto a : arr)
	{
		number += a;
	}
	return number;
}


int main()
{

	return 0;
}